# -*- coding: utf-8 -*-  
import numpy as np  
from matplotlib.font_manager import FontProperties
from matplotlib.ticker import MultipleLocator, FormatStrFormatter
import matplotlib.pyplot as plt

x = [1,2,3,4,5,6,7]

ap = [0.4195,0.8242,0.4956,0.3702,0.7866,0.7892,0.8722]
ar = [0.1683,0.5162,0.2519,0.2483,0.6809,0.6785,0.8655]
af = [0.2403,0.6348,0.3341,0.2978,0.7300,0.7274,0.8688]
ia = [0.2727,0.5663,0.3348,0.3244,0.6932,0.6985,0.8881]

plt.figure(figsize=(8,4))
plt.plot(x,ap,'ro-',label="$macro-precision$",color="red",linewidth=2)
plt.plot(x,ar,'gv-',label="$macro-recall$",color="green",linewidth=2)
plt.plot(x,af,'bs-',label="$macro-F$",color="blue",linewidth=2)
plt.plot(x,ia,'ch-',label="$micro-average$",color="black",linewidth=2)
plt.title(u'The Classification based on non-balanced corpus',fontsize =20)
plt.xlim(1, 7)
plt.ylim(0.15, 1.05)
group_labels = ['F1+F2', 'F1+F2+F3','F1+F2+F4','F1+F2+F5','F1+F3+F4+F5','F1+F2+F3+F4+F5','F1+F2+F3+F4+F5+F6']
plt.xticks(x, group_labels, rotation=0,fontsize =16)
plt.legend()
plt.grid()
plt.show()